<!--
<template>
  <div class="columns mt-6">
    <div class="column mt-6">
      <div class="mt-6">
        <p class="content">UH OH! 页面丢失</p>
        <p class="content subtitle mt-6">
          您所寻找的页面不存在， {{ times }} 秒后，将返回首页!
        </p>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "404",
  data() {
    return {
      times: 10
    }
  },
  created() {
    this.goHome();
  },
  methods: {
    goHome: function () {
      this.timer = setInterval(() => {
        this.times--
        if (this.times === 0) {
          clearInterval(this.timer)
          this.$router.push({path: '/'});
        }
      }, 1000)
    }
  }
}
</script>

<style scoped>
</style>
-->

<template>
  <div class = "columns mt-6">
      <div class = "columns mt-6" v-if="eng === 'zh'">
          <div class = "mt-6">
              <p class = "content"> UH OH!页面丢失了</p>
              <p class = "content subtitle mt-6"> 
                  你所寻找的页面不存在，{{ times }} 秒后，将返回首页！！
              </p>
          </div>
      </div>
      <div class = "columns mt-6" v-else>
          <div class = "mt-6">
              <p class = "content"> UH OH! The page is missing</p>
              <p class = "content subtitle mt-6"> 
                  The page you are looking for does not exist, {{ times }} seconds later, you will return to the home page!!
              </p>
          </div>
      </div>
  </div>

</template>

<script>
import { getLang } from "@/util/auth"
export default {
  name: "404",
  data() {
    return {
      times:10,
      eng: ''
    };
  },
  created() {
    this.goHome();
    this.eng = getLang()
  },
  methods: {
    goHome:function(){
        this.timer = setInterval(()=>{
            this.times -- ;
            if(this.times === 0){
                clearInterval(this.timer);
                this.$router.push({path:'/'});
            }
        },1000)
    }
  },
};
</script>

<style>
</style>